package ks.client.controllers;

import org.w3c.dom.Node;

import ks.client.lobby.Lobby;
import ks.framework.common.Message;
import ks.framework.interfaces.IProcessMessage;

/**
 * Shows how to process Output requests from server.
 * 
 * @author George Heineman
 */
public class LobbyOutputController implements IProcessMessage {

	/** Lobby being managed. */
	Lobby lobby;
	
	public LobbyOutputController(Lobby lobby) {
		this.lobby = lobby;
	}

	/** Process message. */
	public boolean process(Message m) {
		Node output = m.contents();

		String s =  output.getTextContent();
		
		lobby.append(s);
		return true;
	}

}
